<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@taglib prefix="s" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>报关报检业务管理</title>
    <jsp:include page="../../head.jsp"/>
    <script type="text/javascript" src="/gtimp/js/business/hgdata.js"></script>
    <script type="text/javascript" src="/gtimp/js/hint/jquery.hint.js"></script>
    <!-- 自定义style -->
    <style>
        .labelTD_80 {
            width: 80px;
            text-align: right;
            background-color: #e0ebf7;
            border-left: 1px solid #0070A3;
            font-size: 12px
        }

        .labelTD_40 {
            text-align: right;
            background-color: #e0ebf7;
            border-left: 1px solid #0070A3;
            font-size: 12px
        }

        table {
            clear: both;
        }

        ul, li {
            list-style: none;
        }

        .li1 {
            list-style: none;
            float: left;
            line-height: 2em;
        }

        .li2 {
            list-style: none;
            float: left;
        }

        .ul1 {
            list-style: none;
            clear: left;
        }

        .div_content {
            display: none;
        }

        .li_content {
            display: none;
        }

        .pointer {
            cursor: pointer;
        }

        .hiddenValue {
            display: none;
        }

        .sendSup {
            float: left;
        }

        .sendSup ul {
            float: left;
            margin-left: 0;
        }

        .sendSup ul li {
            float: left;
        }

        .sendSup ul li ul {
            float: left;
        }

        .sendSup ul li ul li {
            text-align: center;
        }

        .bizMsg {
            margin: 5px;
            float: left;
        }

        .bizMsg div ul {
            padding-left: 0px;
            margin-left: 0px;
        }

        .bizMsg div ul li inpu {
            width: 140px;
        }

        .bizMsg div ul li select {
            width: 140px;
            z-index: 0;
        }

        .clean {
            clear: both;
        }
    </style>
    <!-- 自定义style -->
    <!-- 自定义script -->
    <script type="text/javascript">
        $(function () {
            $(":input").attr("readonly", "readonly");
        });

        $(function () {
            initFuncButton();
        });

        function initFuncButton() {
            $("button").attr("disabled", true);
            var declarationState = "${declaration.decState}";
            if (declarationState == "DS01") {
                $("#vpassBtn").attr("disabled", false);
                $("#vrejectBtn").attr("disabled", false);
            }
            $("#returnBtn").attr("disabled", false);
        }

        function validatePass() {
            var id = "${declaration.id}";

            var iddata = "id=" + id + "&opType=tgsh";
            $.ajax({
                       cache: false,
                       url: "declaration-checkValidatePass",
                       dataType: "json",
                       data: iddata,
                       success: function (data) {
                           if (!data) {
                               return;
                           }
                           var msg = data.msg ? $.parseJSON(data.msg) : "";
                           if (msg.state == 1) {
                               jw.confirm("确定要该业务通过审核?", function () {
                                              $.ajax({
                                                         cache: false,
                                                         url: "declaration-validatePass",
                                                         dataType: "json",
                                                         data: iddata,
                                                         success: function (data) {
                                                             jw.alert($.parseJSON(data.msg).msg,
                                                                      {
                                                                          onOk: function () {
                                                                              window.location.href =
                                                                                      "declaration-listForSupToValidate";
                                                                          }
                                                                      });
                                                         }
                                                     });
                                          },
                                          function () {
                                              return;
                                          });
                           }
                           else if (msg !== undefined && msg != "" && msg.state == 0) {
                               jw.alert("只有处于待审核状态的业务才可以进行审核操作。");
                           }
                           else {
                               jw.alert(msg.msg);
                           }
                       }
                   });
        }

        function validateReject() {
            var id = "${declaration.id}";

            var iddata = "id=" + id + "&opType=bh";
            $.ajax({
                       cache: false,
                       url: "declaration-checkValidatePass",
                       dataType: "json",
                       data: iddata,
                       success: function (data) {
                           if (!data) {
                               return;
                           }
                           var msg = data.msg ? $.parseJSON(data.msg) : "";
                           if (msg.state == 1) {
                               jw.dialog({
                                             iframe: '../business/rejectContent-reject?id=' + id
                                                     + "&type=1",
                                             title: "驳回",
                                             iframeFetchTitle: false,
                                             width: 500,
                                             height: 150
                                         });

// 				jw.confirm("确定要驳回该业务?",function(){
// 					$.ajax({
// 						cache: false,
// 						url : "declaration-validateReject",
// 						dataType : "json",
// 						data : iddata,
// 						success : function(data) {
// 							jw.alert($.parseJSON(data.msg).msg,
// 									{
// 										onOk: function() {
// 											window.location.href="declaration-listForSupToValidate";
// 										}
// 									});
// 						}
// 					});
// 				},
// 				function(){return;});
                           }
                           else if (msg !== undefined && msg != "" && msg.state == 0) {
                               jw.alert("只有处于待审核状态的业务才可以进行驳回业务操作。");
                           }
                           else {
                               alert("else");
                               jw.alert(msg.msg);
                           }
                       }
                   });
        }
    </script>

</head>
<body>
<script type="text/javascript">

    function getPi(value) {
        var cBook = $('#book').attr('checked');
        var cTrail = $('#trail').attr('checked');
        var cDeclarate = $('#declarate').attr('checked');
        /* if(cDeclarate && cBook && cDeclarate == "checked" && cBook == "checked"){
         $("#contract_no").attr("value",$("#book_pi").val());
         } */
        if (value && value != "最长20个字符") {
            if (cBook == "checked") {
                $("#book_pi").attr("value", value);
            }
            if (cTrail == "checked") {
                $("#trial_pi").attr("value", value);
            }
            if (cDeclarate == "checked") {
                $("#contract_no").attr("value", value);
            }
        }
    }
</script>
<div class="sendSup">
    <ul>
        <li>
            <ul class="right-aligned">
                <li class="li1">公司名称：<input type="text" id="company" readOnly="readOnly"
                                            name="shipper.company"
                                            value="${declaration.customer.contactor}"/></li>
                <li class="li1 li1_space">联系人：<input type="text" id="name" readonly="readonly"
                                                     name="shipper.name"
                                                     value="${declaration.customer.name }"/></li>
                <li class="li2 li1_space">联系电话：<input type="text" id="phone" readonly="readonly"
                                                      name="shipper.phone"
                                                      value="${declaration.customer.phone }"/></li>
                <li class="li2 li1_space">联系地址：<input type="text" readonly="readonly"
                                                      id="address" name="shipper.address"
                                                      value="${declaration.customer.address}"/><input
                        type="hidden"
                        id="shipId"
                        name="shipper.id"
                        value="${declaration.customer.id }"/>
                </li>
                <li class="li2 li1_space">传真：<input type="text" id="fax" readonly="readonly"
                                                    name="shipper.fax"
                                                    value="${declaration.customer.fax}"/></li>
            </ul>
        </li>
    </ul>
</div>
<div id="submit_declarate"></div>
<div id="tab_declarate">
    <div id="input_declare_goods" style="display: none;"></div>
    <div id="input_declare_suifudans" style="display: none;"></div>
    <input value="${declaration.id }" type="hidden" name="declare.id"/>
    <input value="${checkDetail }" type="hidden" id="checkDetailInput"/>
    <ul class="ul1">
        <li class="li1" style="font-size: 14px; padding-top: 4px;">预录入编号:</li>
        <li class="li1"><input type="text" class="textInput" name="declare.sno"
                               maxlength="9" style="width: 150px;" value="${declaration.sno}"></li>
        <li class="li1" style="font-size: 14px; padding-top: 4px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;报关报检业务代理人：</li>
        <li class="li1"><input style="width: 150px;" type="text" id="declaration_sup_id"
                               name="declare.supCompany.name"
                               value="${declaration.supCompany.name}"/><input
                type="hidden" id="declaration_sup" name="declare.supCompany.id"
                value="${declaration.supCompany.id }"/></li>
        <li class="li1">
            <s:if test="{declaration.id!=null}">
                &nbsp;&nbsp;<input type="button" style="width: 95px;" value="打印报关单" onclick="javascript:window.open('http://219.130.222.62:9480/WebReport/ReportServer?reportlet=qp/chukouhuowubaoguandan.cpt&ID=${declaration.id}');" />
            </s:if>
        </li>
    </ul>
    <input type="hidden" class="textInput" name="declare.tex_company"
           value="${declaration.tex_company}"
           disabled="disabled"/><!-- 纳税单位 -->
    <input type="hidden" name="declare.voyage_no" value="${declaration.voyage_no}"><!-- 航次号 -->
    <input type="hidden" class="textInput" id="declaretion_type" name="declare.customs_type"
           value="${declaration.customs_type}"/><!-- 报关单类型 -->
    <table rules="rows" id="baseInfoTB" class="baseInfoTB_bg">
        <tr>

            <td class="labelTD_80" id="label_ep">出口口岸</td>
            <td colspan="3"><input type="text" class="textInput" name="declare.export_port"
                                   style="width: 237px;"
                                   maxlength="20"
                                   value="${declaration.export_port}" id="export_show">
                <input name="" value="${declaration.export_port}"
                       id="export" type="hidden"/>
            </td>
            <td class="labelTD_80">备案号</td>
            <td><input type="text"
                       class="textInput validate[custom[recordCode]]" id="record_id"
                       name="declare.record_id" maxlength="12" onblur="checkRECORD_ID()"
                       value="${declaration.record_id}"></td>
            <td class="labelTD_80" id="label_epdate">出口日期</td>
            <td><input type="text" class="textInput"
                       name="declare.export_date" value="${declaration.export_date}"
                       disabled="disabled"></td>
            <td class="labelTD_80" id="label_epdate">申报日期</td>
            <td><input type="text" class="textInput" id="reportDate"
                       name="declare.report_date" disabled="disabled"
                       value="${declaration.report_date}"
            ></td>
        </tr>
        <tr>
            <td class="labelTD_80">经营单位</td>
            <td><input type="text" class="textInput" id="company_code" style="width:80px;"
                       name="declare.company_co" value="${declaration.company_co}"
                       title="经营单位代码"></td>
            <td colspan="2">&nbsp;<input type="text" class="textInput"
                                         id="company_name" name="declare.company_name"
                                         style="width: 145px;"
                                         title="经营单位名称" value="${declaration.company_name}"></td>
            <td class="labelTD_80">运输方式</td>
            <td><input type="text" class="textInput"
                       name="declare.transport_mode" value="${declaration.transport_mode}"
                       disabled="disabled"></td>
            <td class="labelTD_80">运输工具名称</td>
            <td><input type="text" class="textInput"
                       name="declare.transport_na"
                       value="${declaration.transport_na}"></td>
            <td class="labelTD_80">提运单号</td>
            <td><input type="text" class="textInput" name="declare.bl_no"
                       maxlength="15" title="最长15个字符" value="${declaration.bl_no}"></td>
        </tr>
        <tr>
            <td class="labelTD_80" id="label_fahuo">发货单位</td>
            <td><input type="text" class="textInput" title="发货单位代码" style="width:80px;"
                       id="fahuo_company_co" name="declare.fahuo_company_co"
                       value="${declaration.fahuo_company_co}"></td>
            <td colspan="2">&nbsp;<input type="text" class="textInput"
                                         id="fahuo_company_name" name="declare.fahuo_company_name"
                                         style="width: 145px;" title="发货单位名称"
                                         value="${declaration.fahuo_company_name}"></td>
            <td class="labelTD_80">贸易方式</td>
            <td><input type="text" class="textInput" id="trade_show"
                       value="${declaration.trade_mode}"
                       name="declare.trade_mode"> <input
                    name="" id="trade" value="${declaration.trade_mode}"
                    type="hidden"></td>
            <td class="labelTD_80">征免性质</td>
            <td><input type="text" name="declare.levymode" class="textInput" id="levy_show"
                       value="${declaration.levymode}">
                <input id="levy" type="hidden" name="" value="${declaration.levymode}">
            </td>
            <td class="labelTD_80" id="label_lc_type">结汇方式</td>
            <td><input type="text" class="textInput" name="declare.lc_type"
                       id="lc_show" value="${declaration.lc_type}"> <input
                    name="" id="lc" value="${declaration.lc_type}"
                    type="hidden"></td>
        </tr>

        <!-- 		<tr style="display: none;"> -->
        <!-- 			<td class="labelTD_80">申报单位</td> -->
        <!-- 			<td><input type="text" class="textInput" -->
        <!-- 				name="declare.shenbao_company_co" title="申报单位代码" -->
        <%-- value="${declare.shenbao_company_co}"></td> --%>
        <!-- 			<td colspan="2"><input type="text" class="textInput" title="申报单位名称" -->
        <!-- 				name="declare.shenbao_company_name" style="width: 248px;" -->
        <%-- value="${declare.shenbao_company_name}"></td> --%>
        <!-- 			<td></td> -->
        <!-- 			<td></td> -->
        <!-- 		</tr> -->
        <tr>

            <td class="labelTD_80">许可证号</td>
            <td colspan="3"><input type="text" class="textInput" style="width:237px"
                                   name="declare.license_no" value="${declaration.license_no}"></td>
            <td class="labelTD_80" id="label_arrived_country">运抵国</td>
            <td><input type="text" class="textInput" style="width:120px"
                       id="arrived_country_show" name="declare.arrived_country"
                       value="${declaration.arrived_country}"> <input
                    name="" id="arrived_country"
                    value="${declaration.arrived_country}" type="hidden">
            </td>
            <td class="labelTD_80" id="label_arrived_port">指运港</td>
            <td><input type="text" class="textInput" title=""
                       id="arrived_port_show" name="declare.arrived_port"
                       value="${declaration.arrived_port}"> <input
                    name="" id="arrived_port"
                    value="${declaration.arrived_port}" type="hidden"></td>
            <td class="labelTD_80" id="goods_place">境内货源地</td>
            <td><input type="text" class="textInput" id="addr_show"
                       name="declare.goods_addr" value="${declaration.goods_addr}">
                <input id="addr" value="${declaration.goods_addr}" type="hidden">
            </td>
        </tr>
        <tr>
            <td class="labelTD_80">批准文号</td>
            <td colspan="3"><input type="text" class="textInput" style="width:237px;"
                                   name="declare.approval_no" value="${declaration.approval_no}">
            </td>
            <td class="labelTD_80">成交方式</td>
            <td><input type="text" class="textInput" id="deal_show"
                       name="declare.deal_mode" value="${declaration.deal_mode}"> <input
                    name="" id="deal" value="${declaration.deal_mode}"
                    type="hidden"></td>
            <td class="labelTD_80" colspan="4"></td>
        </tr>
        <tr>
            <td class="labelTD_80">运费</td>
            <td colspan="3"><input type="text" class="textInput" name="declare.freight1"
                                   id="freight1"
                                   style="width:230px;"
                                   title="计算类型" value="${declaration.freight1}"></td>
            <td colspan="2">&nbsp;<input type="text" class="textInput" name="declare.freight2"
                                         style="width:200px;"
                                         title="数量" value="${declaration.freight2}"></td>
            <td colspan="2"><input type="text" class="textInput" name="declare.freight3"
                                   style="width:200px;"
                                   title="币制" id="freight3_show" value="${declaration.freight3}">
                <input
                        type="hidden" class="textInput" name="" title="币制"
                        id="freight3" value="${declaration.freight3}"></td>
            <td class="labelTD_80" colspan="2"></td>
        </tr>
        <tr>
            <td class="labelTD_80">保费</td>
            <td colspan="3"><input type="text" class="textInput" name="declare.premium1"
                                   id="premium1"
                                   style="width:230px;"
                                   title="同上" value="${declaration.premium1}"></td>
            <td colspan="2">&nbsp;<input type="text" class="textInput" name="declare.premium2"
                                         style="width:200px;"
                                         title="同上" value="${declaration.premium2}"></td>
            <td colspan="2"><input type="text" class="textInput" name="declare.premium3"
                                   style="width:200px;"
                                   title="同上" id="premium3_show" value="${declaration.premium3}">
                <input
                        type="hidden" class="textInput" name="" title="同上"
                        id="premium3" value="${declaration.premium3}"></td>
            <td class="labelTD_80" colspan="2"></td>
        </tr>
        <tr>
            <td class="labelTD_80">杂费</td>
            <td colspan="3"><input type="text" class="textInput" title="同上" style="width:230px;"
                                   name="declare.otherfee1" id="otherfee1"
                                   value="${declaration.otherfee1}"></td>
            <td colspan="2">&nbsp;<input type="text" class="textInput" title="同上"
                                         style="width:200px;"
                                         name="declare.otherfee2" value="${declaration.otherfee2}">
            </td>
            <td colspan="2"><input type="text" class="textInput" title="同上" style="width:200px;"
                                   id="otherfee3_show" name="declare.otherfee3"
                                   value="${declaration.otherfee3}"> <input type="hidden"
                                                                            class="textInput"
                                                                            title="同上"
                                                                            id="otherfee3"
                                                                            name=""
                                                                            value="${declaration.otherfee3}">
            </td>
            <td class="labelTD_80" colspan="2"></td>
        </tr>
        <tr>
            <td class="labelTD_80">合同协议号</td>
            <td><input type="text" class="textInput" id="contract_no"
                       name="declare.contract_no" maxlength="20" style="width:80px;"
                       title="最长20个字符" onblur="javascript:getPi(this.value);"></td>
            <td class="labelTD_40">件数</td>
            <td><input type="text" class="textInput"
                       name="declare.goods_count" value="${declaration.goods_count}"
                       style="width:122px;"></td>
            <td class="labelTD_80">包装种类</td>
            <td><input type="text" class="textInput" id="packet_type"
                       name="declare.goods_package" value="${declaration.goods_package}"></td>
            <td class="labelTD_80">毛重（KG）</td>
            <td><input type="text" class="textInput"
                       name="declare.gross_weight" value="${declaration.gross_weight}"></td>
            <td class="labelTD_80">净重（KG）</td>
            <td><input type="text" class="textInput"
                       name="declare.net_weight" value="${declaration.net_weight}"></td>
        </tr>
        <tr>
            <td class="labelTD_80">集装箱号</td>
            <td colspan="3"><input id="container_no" type="text" class="textInput"
                                   style="width:232px;"
                                   disabled="disabled"
                                   name="declare.container_no" value="${declaration.container_no}">
            </td>
            <td class="labelTD_80">随附单证</td>
            <td colspan="2"><input type="text" class="textInput" style="width:150px;"
                                   name="declare.suifudan"
                                   value="${declaration.suifudan}" disabled="disabled"></td>
            <td class="labelTD_80">生产厂家</td>
            <td colspan="2"><input type="text" class="textInput" style="width:150px;"
                                   name="declare.produce_factory"
                                   value="${declaration.produce_factory }"></td>
            <!--需要在报关实体类中添加该属性  -->
        </tr>
        <tr>
            <td class="labelTD" rowspan="3">标记唛码及备注</td>
            <td colspan="9" rowspan="3"><input type="text" class="textInput" id="remark"
                                               name="declare.remark"
                                               style="width: 880px;height:40px"
                                               value="${declaration.remark}"></td>
        </tr>
        <tr></tr>
        <tr></tr>
    </table>

    <div class="a">
        <table rules="rows" id="goodsListTB" class="dataTB dataTB_Individual" border="1">
            <tr class="titleTR" title="选中记录后，Ctrl+Z复制记录，Ctrl+U向上移动记录，Ctrl+I插入记录">
                <td class="titleTD" style="width: 40px;;display:none" lang='declara_num'>序号</td>
                <td class="titleTD" style="width: 70px;" lang='code_t'>商品编号</td>
                <td class="titleTD" style="width: 70px;" lang="record_id">备案序号</td>
                <td class="titleTD" style="width: 120px;" lang="name">商品名称</td>
                <td class="titleTD" style="width: 100px;" lang="goods_mode">规格</td>
                <td class="titleTD" style="width: 70px;" lang="destination">目的地</td>
                <td class="titleTD" style="width: 50px;" lang="count">数量</td>
                <td class="titleTD" style="width: 50px;" lang="unit">单位</td>
                <td class="titleTD" style="width: 50px;" lang="currency">币制</td>
                <td class="titleTD" style="width: 50px;" lang="total_price">总价</td>
                <td class="titleTD" style="width: 50px" lang="levymode">征免</td>
                <td class="hiddenValue" lang="code_s">附加编号</td>
                <td class="hiddenValue" lang="unit_price">成交单价</td>
                <td class="hiddenValue" lang="legal_count">法定数量</td>
                <td class="hiddenValue" lang="legal_unit">法定单位</td>
                <td class="hiddenValue" lang="version_no">版本号</td>
                <td class="hiddenValue" lang="goods_no">货号</td>
                <td class="hiddenValue" lang="producer">生产厂家</td>
                <td class="hiddenValue" lang="second_count">第二数量</td>
                <td class="hiddenValue" lang="second_unit">第二单位</td>
                <td class="hiddenValue" lang="processing_fee">工缴费</td>
                <td class="hiddenValue" lang="">附加编号位置</td>
                <td class="hiddenValue" lang="id">主键</td>
            </tr>
            <c:if test="${declaration==null}">
                <tr>
                    <td class="titleTD" style="width: 35px;display:none;" lang="declara_num"><input
                            style="width: 35px;"
                            type="text" value="0"/></td>
                    <td style="width: 86px;" lang="code_t"><input id="goods_code_t" name="code_t"
                                                                  style="width: 86px;"
                                                                  type="text" value="${code_t}"/></td>
                    <td style="width: 86px;" lang="record_id"><input id="goods_record_id"
                                                                     style="width: 86px;"
                                                                     disabled="disabled" type="text"
                                                                     value="${record_id}"/></td>
                    <td style="width: 160px;" lang="name"><input id="goods_name"
                                                                 style="width: 160px;" type="text"
                                                                 value="${name}"/></td>
                    <td style="width: 133px;" lang="goods_mode"><input id="goods_goods_mode"
                                                                       style="width: 133px;"
                                                                       disabled="disabled"
                                                                       type="text" value="${goods_mode}"/></td>
                    <td style="width: 83px;" lang="destination"><input id="goods_destination_show"
                                                                       style="width: 83px;"
                                                                       type="text" value="${destination}"/></td>
                    <td style="width: 68px;" lang="count"><input id="goods_count"
                                                                 style="width: 68px;" type="text"
                                                                 value="${count}"/></td>
                    <td style="width: 68px;" lang="unit"><input id="goods_unit" style="width: 68px;"
                                                                type="text" value="${unit}"/></td>
                    <td style="width: 68px;" lang="currency"><input id="goods_currency_show"
                                                                    style="width: 68px;"
                                                                    type="text" value="${currency}"/></td>
                    <td style="width: 68px;" lang="total_price"><input id="goods_total_price"
                                                                       style="width: 68px;"
                                                                       type="text" value="${total_price}"/></td>
                    <td style="width: 68px;" lang="levymode"><input id="declareLevymode"
                                                                    style="width: 68px;"
                                                                    type="text" value="${levymode}"/></td>
                </tr>
            </c:if>
            <c:forEach items="${declaration.commodities}" varStatus="st">
                <tr class="titleTR1" id='declara_num_${st.index}'
                    style="cursor: pointer;">
                        <%-- 					<td class="titleTD" style="width: 35px;" lang="declara_num"><input class="titleTD"  disabled="disabled" style="width: 35px;" type="text" value="<s:property --%>
                        <%-- 							value="#st.index" />"/></td> --%>
                        <%-- 					<td style="width: 65px;" lang="code_t"><input class="titleTD" name="code_t" disabled="disabled" style="width: 65px;" type="text" value="<s:property --%>
                        <%-- 							value="code_t" />"/></td> --%>
                        <%-- 					<td style="width: 65px;" lang="record_id"><input class="titleTD" disabled="disabled" style="WIDTH: 65px" type="text" value="<s:property --%>
                        <%-- 							value="record_id" />"/></td> --%>
                        <%-- 					<td style="width: 120px;" lang="name"><input class="titleTD" disabled="disabled" style="width: 120px;" type="text" value="<s:property --%>
                        <%-- 							value="name" />"/></td> --%>
                        <%-- 					<td style="width: 100px;" lang="goods_mode"><input class="titleTD" disabled="disabled" style="width: 100px;" type="text" value="<s:property --%>
                        <%-- 							value="goods_mode" />"/></td> --%>
                        <%-- 					<td style="width: 70px;" lang="destination"><input class="titleTD" disabled="disabled" style="width: 70px;" type="text" value="<s:property --%>
                        <%-- 							value="destination" />"/></td> --%>
                        <%-- 					<td  style="width: 50px;" lang="count"><input class="titleTD" disabled="disabled" style="width: 50px;" type="text" value="<s:property --%>
                        <%-- 							value="count" />"/></td> --%>
                        <%-- 					<td style="width: 50px;" lang="unit"><input class="titleTD" disabled="disabled" style="width: 50px;" type="text" value="<s:property --%>
                        <%-- 							value="unit" />"/></td> --%>
                        <%-- 					<td style="width: 50px;" lang="currency"><input class="titleTD" disabled="disabled" style="width: 50px;" type="text" value="<s:property --%>
                        <%-- 							value="currency" />"/></td> --%>
                        <%-- 					<td style="width: 50px;" lang="total_price"><input class="titleTD" disabled="disabled" style="width: 50px;" type="text" value="<s:property --%>
                        <%-- 							value="total_price" />"/></td> --%>
                        <%-- 					<td  style="width: 50px;" lang="levymode"><input class="titleTD" disabled="disabled" style="width: 50px;" type="text" value="<s:property --%>
                        <%-- 							value="levymode" />"/></td> --%>
                    <td class="titleTD" style="width: 35px;display:none;">${st.index}</td>
                    <td style="width: 86px;">${code_t}</td>
                    <td style="width: 86px;">${record_id}</td>
                    <td style="width: 160px;">${name}</td>
                    <td style="width: 133px;">${goods_mode}</td>
                    <td style="width: 83px;">${destination}</td>
                    <td style="width: 63px;">${count}</td>
                    <td style="width: 63px;">${unit}</td>
                    <td style="width: 63px;">${currency}</td>
                    <td style="width: 63px;">${total_price}</td>
                    <td style="width: 63px;">${levymode}</td>

                    <td class="hiddenValue" lang="code_s">${code_s}</td>
                    <td class="hiddenValue" lang="unit_price">${unit_price}</td>
                    <td class="hiddenValue" lang="legal_count">${legal_count}</td>
                    <td class="hiddenValue" lang="legal_unit">${legal_unit}</td>
                    <td class="hiddenValue" lang="version_no">${version_no}</td>
                    <td class="hiddenValue" lang="goods_no">${goods_no}</td>
                    <td class="hiddenValue" lang="producer">${producer}</td>
                    <td class="hiddenValue" lang="second_count">${second_count}</td>
                    <td class="hiddenValue" lang="second_unit">${second_unit}</td>
                    <td class="hiddenValue" lang="processing_fee">${processing_fee}</td>
                    <td class="hiddenValue" lang=""></td>
                    <td class="hiddenValue" lang="id">${id}</td>
                </tr>
            </c:forEach>
        </table>
    </div>
    <table style="margin: 0 0 20px 566px;display:none;">
        <tr>
            <td class="labelTD_80"
                style="height: 30px; background-color: #F2F5F7; border: none; color: red">总价汇总：
            </td>
            <td id="gTotal" class="goodsInput disableInput" style="color: red;"></td>
        </tr>
    </table>


    <div id="goodsDiv">
        <div id="CODE_POSI" class="0"></div>
        <div style="float: left;">
            <!--  			<table id="goodsInfoTB" rules="rows" class="goodsInTB" style="display:none;">
                            <tr>
                                <td class="labelTD_80">备案序号</td>
                                <td><input type="text" class="goodsInput" id="goods_record_id"
                                    disabled="disabled" /></td>
                                <td class="labelTD_80">商品编号</td>
                                <td>
                                        name="commodity.code_t"					<input type="text" class="goodsInput" id="goods_code_t" maxlength="8"  onfocus="initGoodsCodeEdit();"/>
            -->
            <!-- 						<input type="text" class="goodsInput" id="goods_code_t" -->
            <%-- 						 value="${commodity.code_t }" maxlength="8" /> --%>
            <!-- 					onfocus="initGoodsCodeEdit();" <input type="hidden" -->
            <!-- 						class="goodsInput" id="goods_code_hide"  -->
            <%-- 						value="${commodity.code_t }" maxlength="8" /> --%>
            <!-- 					</td>
                                <td class="labelTD_80">附加编号</td>
                                <td><input type="text" class="goodsInput disableInput"
                                    disabled="disabled" id="goods_code_s" /></td>
                            </tr>
                            <tr>
                                <td class="labelTD_80">商品名称</td>
                                <td><input type="text" class="goodsInput" id="goods_name" /></td>
                                <td class="labelTD_80">规格型号</td>
                                <td colspan="3"><input type="text"
                                    class="goodsInput disableInput" id="goods_goods_mode"
                                    disabled="disabled" style="width: 339px;" /></td>
                            </tr>
                            <tr>
                                <td class="labelTD_80">成交数量</td>
                                <td><input type="text" class="goodsInput" id="goods_count" /></td>
                                <td class="labelTD_80">成交单位</td>
                                <td><input type="text" class="goodsInput" id="goods_unit" /></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="labelTD_80">成交单价</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_unit_price" /></td>
                                <td class="labelTD_80">成交总价</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_total_price" /></td>
                                <td class="labelTD_80">币制</td>
                                <td>
                                                            <input type="text" class="goodsInput" id="goods_currency" />
                                    <input type="text" class="goodsInput" id="goods_currency_show" >
                                    <input type="hidden" class="goodsInput" id="goods_currency" >
                                </td>
                            </tr>
                            <tr>
                                <td class="labelTD_80">法定数量</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_legal_count" /></td>
                                <td class="labelTD_80">法定单位</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_legal_unit" disabled="disabled" /></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="labelTD_80">版本号</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_version_no" /></td>
                                <td class="labelTD_80">货号</td>
                                <td><input type="text" class="goodsInput" id="goods_goods_no" /></td>
                                <td class="labelTD_80" id="label_gproducer">生产厂家</td>
                                <td><input type="text" class="goodsInput" id="goods_producer" /></td>
                            </tr>
                            <tr>
                                <td class="labelTD_80">第二数量</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_second_count" /></td>
                                <td class="labelTD_80">第二单位</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_second_unit"  /></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="labelTD_80" id="gdestination">目的地</td>
                                <td>
                                                            <input type="text" class="goodsInput" id="goods_destination" />
             -->
            <!-- 						<input type="text" class="goodsInput" name="declare.arrived_country" -->
            <!-- 						id="goods_destination_show" value=""> <input -->
            <!-- 						type="hidden" class="goodsInput" name="" -->
            <%-- 						id="goods_destination" value="${declaration.arrived_country}"> --%>
            <!--					<input type="text" class="goodsInput" id="goods_destination_show"/>
                                <input type="hidden" class="goodsInput" id="goods_destination"/>
                                </td>
                                <td class="labelTD_80">征免</td>
                                <td><input type="text" class="goodsInput" id="goods_levymode" />
                                    <input class="goodsInput" id="goods_levymode_val" type="hidden" />
                                </td>
                                <td class="labelTD_80" id="gprocessing_fee">工缴费</td>
                                <td><input type="text" class="goodsInput"
                                    id="goods_processing_fee" /> <input type="hidden"
                                    id="goods_declara_num" /> <input type="text"
                                    style="display: none;" id="goods_id" /></td>
                            </tr>


                            <tr>
                                <td colspan="6" style="background-color: #dfe2f8"><input
                                    style="float: right; background-color: background-color:#dfe2f8"
                                    onclick="confirm_declaraGoods();" type="button" value="确认" id="queren1" /></td>
                            </tr>
                        </table>
              -->
        </div>

        <br>
        <div style="float: left; margin-left: 35px;">
            <table rules="rows" id="suifudanListTB"
                   class="dataTB righdataTB_Individual">
                <tr class="titleTR">
                    <!-- 					<td class="titleTD titleTD_Individual" lang="suifudan_co">随附单代码</td> -->
                    <td class="titleTD titleTD_Individual" lang="suifudan_co">随附单名称</td>
                    <td class="titleTD titleTD_Individual" lang="suifudan_no">随附单编号</td>
                    <td class="hiddenValue" lang="suifudan_num"></td>
                    <td class="hiddenValue" lang="id">主键</td>
                </tr>
                <c:forEach  items="${declaration.suiFuDans}" varStatus="st">
                    <tr onclick="edit(this);" style="cursor: pointer;"
                        id="suifudan_num_${st.index}">
                        <td lang="suifudan_co">${suifudan_co}</td>
                        <td lang="suifudan_no">${suifudan_no}</td>
                        <td class="hiddenValue" lang="suifudan_num">${id}</td>
                        <td class="hiddenValue" lang="id">${id}</td>
                    </tr>
                </c:forEach>
            </table>
            <table class="rightTB" id="suifudanInfoTB" rules="rows">
                <tr>
                    <!-- 					<td class="labelTD_80">随附单代码</td> -->
                    <td class="labelTD_80">随附单名称</td>
                    <td><input type="text" class="suifuInput"
                               id="goods_suifudan_co" style="width: 180px;"/></td>
                </tr>
                <tr>
                    <td class="labelTD_80">随附单编号</td>
                    <td><input type="text" class="suifuInput"
                               id="goods_suifudan_no" style="width: 180px;"/><input
                            type="hidden" id="goods_suifudan_num"/><input type="hidden"
                                                                          id="goods_id"/></td>
                </tr>
                <tr>
                    <td colspan="2" style="background-color: #dfe2f8"><input
                            style="float: right; background-color: background-color:#dfe2f8"
                            type="button" onclick="confirm_suifudan();" value="确认" id="queren2"/>
                    </td>
                </tr>
            </table>
            <table class="rightTB" id="otherInfoTB" rules="rows">
                <tr>
                    <td class="labelTD_80">关联报关单</td>
                    <td><input type="text" name="declare.re_manifest"
                               value="${declaration.re_manifest}"></td>
                </tr>
                <tr>
                    <td class="labelTD_80">关联备案</td>
                    <td><input type="text" name="declare.re_record_id"
                               value="${declaration.re_record_id}"></td>
                </tr>
                <tr>
                    <td class="labelTD_80">监管仓号</td>
                    <td><input type="text" name="declare.re_jianguan"
                               value="${declaration.re_jianguan}"></td>
                </tr>
                <tr>
                    <td class="labelTD_80">货场代码</td>
                    <td><input type="text" name="declare.re_yard_id"
                               value="${declaration.re_yard_id}"></td>
                </tr>
            </table>
        </div>
        <div style="float:left;margin-left: 35px;">
            <table id="goodsModeInputTB" rules="rows" class="dataTB">
            </table>
        </div>
        <div style="clear: both;"></div>
        <!--	<div id="containInfo">
	   	  <table>
	   	  	<tr><td class="first_li">分柜资料附件：</td></tr>
	   	  	<tr><td><s:if test="declaration.containerInfo!= null">${declaration.containerInfo.name}<input type="button" value="删除附件" onclick="cancleUploadAccess();" /></s:if><s:else>上传</s:else></td><td><input id="" type="button" value="选择文件" onclick="uploadAccess();"/></td></tr>
	   	  	<tr>
 	   	  		<td>SO号：</td>
<%-- 	   	  		<td><input type="text" class="textInput" id="" name="trial.so" value="${trial.so }"/></td> --%>
	   	  	</tr>
	   	  </table>
	 </div>
	 <div id="" style="display:none;">
	 	SO信息：<span id=""></span><input name="declare.containerInfo.id" value="${declare.containerInfo.id} id="containerInfoId" style="display:none;"/>
	 </div>
	 <div id="dialog002" style="display:none">
		<s:form id="uploadAccessoryForm" action="attach-upload" enctype="multipart/form-data" method="POST">
			<s:file label="选择文件" name="attach"></s:file>
			<s:submit value="上传"></s:submit>
		</s:form>
	</div>
	</div>-->
    </div>

    <fieldset>
        <legend>操作选项</legend>
        <button ID="vpassBtn" onclick="validatePass();">审核</button>
        <button ID="vrejectBtn" onclick="validateReject();">驳回业务</button>
        <button id="returnBtn" onclick="location.href='declaration-listForSupToValidate';">返回
        </button>
    </fieldset>
</body>
</html>
